<?xml version="1.0" encoding="iso-8859-1" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content=
    "application/xhtml+xml; charset=iso-8859-1" />
    <title>
      Node.js-12.16.1
    </title>
    <link rel="stylesheet" type="text/css" href="../stylesheets/lfs.css" />
    <meta name="generator" content="DocBook XSL Stylesheets V1.78.1" />
    <link rel="stylesheet" href="../stylesheets/lfs-print.css" type=
    "text/css" media="print" />
  </head>
  <body class="blfs" id="blfs-2020-04-02">
    <div class="navheader">
      <h4>
        Beyond Linux<sup>�</sup> From Scratch <span class="phrase">(System
        V</span> Edition) - Version 2020-04-02
      </h4>
      <h3>
        Chapter&nbsp;9.&nbsp;General Libraries
      </h3>
      <ul>
        <li class="prev">
          <a accesskey="p" href="mtdev.html" title="mtdev-1.1.6">Prev</a>
          <p>
            mtdev-1.1.6
          </p>
        </li>
        <li class="next">
          <a accesskey="n" href="npth.html" title="npth-1.6">Next</a>
          <p>
            npth-1.6
          </p>
        </li>
        <li class="up">
          <a accesskey="u" href="genlib.html" title=
          "Chapter&nbsp;9.&nbsp;General Libraries">Up</a>
        </li>
        <li class="home">
          <a accesskey="h" href="../index.html" title=
          "Beyond Linux� From Scratch     (System V Edition) - Version 2020-04-02">
          Home</a>
        </li>
      </ul>
    </div>
    <div class="sect1" lang="en" xml:lang="en">
      <h1 class="sect1">
        <a id="nodejs" name="nodejs"></a>Node.js-12.16.1
      </h1>
      <div class="package" lang="en" xml:lang="en">
        <h2 class="sect2">
          Introduction to Node.js
        </h2>
        <p>
          <span class="application">Node.js</span> is a <span class=
          "application">JavaScript</span> runtime built on <span class=
          "application">Chrome's</span> V8 JavaScript engine.
        </p>
        <p>
          This package is known to build and work properly using an LFS-9.1
          platform.
        </p>
        <h3>
          Package Information
        </h3>
        <div class="itemizedlist">
          <ul class="compact">
            <li class="listitem">
              <p>
                Download (HTTP): <a class="ulink" href=
                "https://nodejs.org/dist/v12.16.1/node-v12.16.1.tar.xz">https://nodejs.org/dist/v12.16.1/node-v12.16.1.tar.xz</a>
              </p>
            </li>
            <li class="listitem">
              <p>
                Download MD5 sum: 549582c075072c689c245ba12ecac54a
              </p>
            </li>
            <li class="listitem">
              <p>
                Download size: 23 MB
              </p>
            </li>
            <li class="listitem">
              <p>
                Estimated disk space required: 658 MB (add 31 MB for tests)
              </p>
            </li>
            <li class="listitem">
              <p>
                Estimated build time: 7.8 SBU (using parallelism=4; add 2.2
                SBU for tests)
              </p>
            </li>
          </ul>
        </div>
        <h3>
          Node.js Dependencies
        </h3>
        <h4>
          Required
        </h4>
        <p class="required">
          <a class="xref" href="python2.html" title=
          "Python-2.7.17">Python-2.7.17</a> and <a class="xref" href=
          "which.html" title="Which-2.21 and Alternatives">Which-2.21</a>
        </p>
        <h4>
          Recommended
        </h4>
        <p class="recommended">
          <a class="xref" href="../basicnet/c-ares.html" title=
          "c-ares-1.16.0">c-ares-1.16.0</a>, <a class="xref" href="icu.html"
          title="ICU-66.1">ICU-66.1</a>, <a class="xref" href="libuv.html"
          title="libuv-1.35.0">libuv-1.35.0</a>, and <a class="xref" href=
          "../basicnet/nghttp2.html" title=
          "nghttp2-1.40.0">nghttp2-1.40.0</a>
        </p>
        <h4>
          Optional
        </h4>
        <p class="optional">
          <a class="ulink" href=
          "https://github.com/nodejs/http-parser">http-parser</a>, <a class=
          "ulink" href="https://www.npmjs.com/">npm</a> (an internal copy of
          <span class="command"><strong>npm</strong></span> will be installed
          if not present)
        </p>
        <p class="usernotes">
          User Notes: <a class="ulink" href=
          "http://wiki.linuxfromscratch.org/blfs/wiki/nodejs">http://wiki.linuxfromscratch.org/blfs/wiki/nodejs</a>
        </p>
      </div>
      <div class="installation" lang="en" xml:lang="en">
        <h2 class="sect2">
          Installation of Node.js
        </h2>
        <p>
          Build <span class="application">Node.js</span> by running the
          following commands:
        </p>
        <pre class="userinput">
<kbd class="command">./configure --prefix=/usr                  \
            --shared-cares                 \
            --shared-libuv                 \
            --shared-nghttp2               \
            --shared-openssl               \
            --shared-zlib                  \
            --with-intl=system-icu         &amp;&amp;
make</kbd>
</pre>
        <p>
          To test the results, issue: <span class="command"><strong>make
          check</strong></span>. One test, test-dns, is known to fail.
        </p>
        <p>
          Now, as the <code class="systemitem">root</code> user:
        </p>
        <pre class="root">
<kbd class="command">make install &amp;&amp;
ln -sf node /usr/share/doc/node-12.16.1</kbd>
</pre>
      </div>
      <div class="commands" lang="en" xml:lang="en">
        <h2 class="sect2">
          Command Explanations
        </h2>
        <p>
          <em class="parameter"><code>--with-intl=system-icu</code></em>: use
          the system version of <span class="application">icu</span>. Other
          values are <code class="option">full-icu</code> (to build a local,
          full <span class="application">icu</span> library) and <code class=
          "option">small-icu</code> (to build a local, minimal <span class=
          "application">icu</span> library).
        </p>
        <p>
          <em class=
          "parameter"><code>--shared-{cares,libuv,nghttp2,openssl,zlib}</code></em>:
          use the system installed libraries instead of local copies.
        </p>
        <p>
          <code class="option">--without-npm</code>: do not build
          <span class="application">npm</span> (use if you'd like to build a
          separate <span class="application">npm</span> later).
        </p>
        <p>
          <code class="option">--shared-http-parser</code>: use the system
          installed library instead of a local copy.
        </p>
      </div>
      <div class="content" lang="en" xml:lang="en">
        <h2 class="sect2">
          Contents
        </h2>
        <div class="segmentedlist">
          <div class="seglistitem">
            <div class="seg">
              <strong class="segtitle">Installed Programs:</strong>
              <span class="segbody">node, npm, and npx</span>
            </div>
            <div class="seg">
              <strong class="segtitle">Installed Library:</strong>
              <span class="segbody">None</span>
            </div>
            <div class="seg">
              <strong class="segtitle">Installed Directories:</strong>
              <span class="segbody">/usr/include/node,
              /usr/lib/node_modules/npm, and
              /usr/share/systemtap/tapset</span>
            </div>
          </div>
        </div>
        <div class="variablelist">
          <h3>
            Short Descriptions
          </h3>
          <table border="0" class="variablelist">
            <colgroup>
              <col align="left" valign="top" />
              <col />
            </colgroup>
            <tbody>
              <tr>
                <td>
                  <p>
                    <a id="node" name="node"></a><span class=
                    "term"><span class=
                    "command"><strong>node</strong></span></span>
                  </p>
                </td>
                <td>
                  <p>
                    is the server-side JavaScript runtime.
                  </p>
                </td>
              </tr>
              <tr>
                <td>
                  <p>
                    <a id="npm" name="npm"></a><span class=
                    "term"><span class="command"><strong>npm</strong></span></span>
                  </p>
                </td>
                <td>
                  <p>
                    is the <span class="application">Node.js</span> package
                    manager.
                  </p>
                </td>
              </tr>
              <tr>
                <td>
                  <p>
                    <span class="term"><code class=
                    "filename">/usr/lib/node_modules/npm/</code></span>
                  </p>
                </td>
                <td>
                  <p>
                    is the installation root for Node.js executables and
                    libraries.
                  </p>
                </td>
              </tr>
            </tbody>
          </table>
        </div>
      </div>
      <p class="updated">
        Last updated on 2020-03-10 09:12:43 -0500
      </p>
    </div>
    <div class="navfooter">
      <ul>
        <li class="prev">
          <a accesskey="p" href="mtdev.html" title="mtdev-1.1.6">Prev</a>
          <p>
            mtdev-1.1.6
          </p>
        </li>
        <li class="next">
          <a accesskey="n" href="npth.html" title="npth-1.6">Next</a>
          <p>
            npth-1.6
          </p>
        </li>
        <li class="up">
          <a accesskey="u" href="genlib.html" title=
          "Chapter&nbsp;9.&nbsp;General Libraries">Up</a>
        </li>
        <li class="home">
          <a accesskey="h" href="../index.html" title=
          "Beyond Linux� From Scratch     (System V Edition) - Version 2020-04-02">
          Home</a>
        </li>
      </ul>
    </div>
  </body>
</html>
